CUBE CONNECT Edition Help

Control Statements

This section describes the control statements for CUBE Cluster:

DISTRIBUTE

The DISTRIBUTE statement globally controls the DP options to turn on/off intrastep or multistep distribute processing.

DISTRIBUTE Keywords

  • MULTISTEP - |?| - Global MULTISTEP DP on/off

  • INTRASTEP - |?| - Global INTRASTEP DP on/off

DISTRIBUTEMULTISTEP

Invoke multistep distributed processing.

DISTRIBUTEMULTISTEP Keywords

  • PROCESSID - |S| - Prefix for the file names used to communicate with the sub-processes. In addition to a string constant, a Pilot string variable can be used to set the ProcessID by putting it within @ characters (for example, ProcessID=@MyID@).

  • PROCESSNUM - |I| - Single process number since the steps are distributed to one process only. In addition to a single numeric constant, a Pilot numeric variable can also be used to set the process number dynamically (for example, ProcessNum=MyProcess).

  • COMMPATH - |S| - Common path for checking for availability of processors. Defaults to null (working directory used).

    The common path is only used for initial communication with the node. The node switches its work directory to be the same as the main process before running the multistep (or intrastep) distributed process. After completing the steps, the node reverts to waiting for the communication file in the COMMPATH directory.

    This will work regardless of the location of the script file and the work directory of the main process. Nodes can be waiting in the COMMPATH directory, then when a model run requests the node it will switch to the work directory for that particular model and run the steps. When it is done, it will go back and wait for further commands in the COMMPATH directory.

ENDDISTRIBUTEMULTISTEP

Statement to end current MULTISTEP subprocess.

WAIT4FILES

When a block of operations is distributed to another computer, the main computer will continue running the script without waiting for the sub-process to finish. It is the user’s responsibility to check for sub-process completion before using output files generated by the sub-process. When a sub-process is done, it will create a {ProcessID}{Process#}.script.end file. Use the Wait4Files command in the Pilot program to wait for the .end file to be created.

WAIT4FILES Keywords

  • FILES - |S| - Specifies a list of all the files to wait for. In addition to a string constant, a Pilot string variable can be used to set the file names by putting it within @ characters (for example, Files=@MyFile@).

    The variable can be a comma-separated list of files with no spaces; for example:

    MYFILES=’Node1.script.end,Node2.script.end’
     
    Wait4Files Files=@MYFILES@, CheckReturnCode=T, DelDistribFiles=T
  • CHECKRETURNCODE - |?| - Specifies if the return codes from the sub- processes should be checked. When true, the whole run will stop if a sub-process returns with a code 2 (fatal) or higher.

  • DELDISTRIBFILES - |?| - Controls the disposition of the MDP temporary communication files. The default is true, meaning to remove all temporary files.

  • PRINTFILES - |S| - Controls the disposition of the print files from the sub-processes. It can be "MERGE," "MERGESAVE," "DELETE," or "SAVE." MERGE means the print files will be merged back into the main print file then deleted. MERGESAVE means to merge the files but not delete them. DELETE means no merge but delete them and SAVE means no merge but save them. The default is SAVE.

  • UPDATEVARS - |S| - Specifies a list of global variables computed in Pilot and logged from individual programs that should be merged back from the sub- process run. Any variables with the first part of the name matching an UpdateVars name will be merged back. For example, for UpdateVars=vname,Matrix.xname, variable vname1,vnameabc,Matrix.xnamevar etc. will all be merged back to the main process.

DISTRIBUTEINTRASTEP

Programs: Matrix, Highway

Invoke intrastep distributed processing. Currently only available in Matrix and Highway.

DISTRIBUTEINTRASTEP Keywords

  • COMMPATH - |S| - Common path for checking for availability of processors. Defaults to null (working directory used).

  • MINGROUPSIZE - |I| - Minimum distributed zone group size. If there are more sub-processes than there are zone groups of this size, then some sub-processes will not be used. For example, if there are 100 zones and MinGroupSize is 20 and ProcessList=1-10, only 4 sub-processes will be used to process 20 zones each and the main process will process 20 zones itself.

  • PROCESSID - |S| - The ProcessID is the prefix for the file names used to communicate with the sub-processes.

  • PROCESSLIST - |I| - List of sub-processes to use for DP. It is a list of numbers and put in as individual numbers or ranges (for example, ProcessList=1,5,10-20,25). Each sub-process must be assigned a unique process number.

  • SAVEPRN - |?| - Switch to control if the sub-process print files should be saved or not.